﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Text;
using Commons;
using DAL;
using DAL.Enums;
using NUnit.Framework;

namespace Entity.Initial.IValue
{
    public class AdmDepartInit : Ini
    {

        public override void Clear()
        {
            using (var db = new PizzaDataDataContext())
            {
                db.AdmDepart.DeleteBatch(p => true);
            }
        }

        public override void Run1()
        {
            using (PizzaDataDataContext db = new PizzaDataDataContext())
            {
                List<AdmDepart> ls = new List<AdmDepart>()
                                   {
                                       new AdmDepart()
                                           {
                                               ID = 1,
                                               Name = "广州香拉",
                                           },
                                       new AdmDepart()
                                           {
                                               ID = 2,
                                               Name = "香格拉里",
                                           }
                                   };
                db.AdmDepart.InsertAllOnSubmit(ls);
                db.SubmitChanges();
            }
        }

        public override void Run2()
        {

        }

        public override void Run3()
        {

        }

        public override void Run4()
        {

        }

        public override void Run5()
        {

        }

        public override void Run6()
        {

        }
    }
}
